docs+fix: README toolCallId pairing; catch SIGTERM as documented - #6
Merged
Conversation
The tool_calls evaluator already pairs by toolCallId authoritatively (with a
name/FIFO fallback only when a result has no id), matching the schema, the trace
docs, and the id-pairing tests. Only the README still described the fallback as
the primary mechanism ("by tool name, in order"); update it to lead with the id.
Also, main registered only os.Interrupt while its comment claimed "SIGINT or
SIGTERM". Register syscall.SIGTERM too so the comment is accurate and a SIGTERM
(the default kill/orchestrator stop signal on Unix) actually cancels an in-flight
run, notably the network-bound LLM judge.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the review on tool-call pairing alignment and the signal-precision nit.
Pairing alignment (review point 1)
Audited all five surfaces. The evaluator, tests, schema, and trace-schema doc were already aligned on
toolCallIdbeing authoritative:evaluator/toolcalls.gomatchPending: id match is authoritative (a result whose id matches no pending call is an orphan, no name fallback); name/FIFO is used only when the result carries no id.evaluator/toolcalls_test.go:PairsByIDOutOfOrder,ResultWithUnknownIDIsOrphan,IDMatchWinsOverNamecover exactly this.trajectory/trace.schema.json:toolCallIdis "Authoritative for pairing when present, in which case no name/order fallback is used";toolis the "Fallback pairing key when toolCallId is absent."docs/trace-schema.md: "Preferred key istoolCallId... authoritative ... Fallback (no id): tool name, FIFO."The README was the only stale surface, describing the fallback as if it were the primary mechanism. Fixed to lead with
toolCallId(authoritative, order-independent) and name/FIFO as fallback.SIGTERM (review point 4)
mainregistered onlyos.Interruptwhile its comment said "SIGINT or SIGTERM". Addedsyscall.SIGTERMso a SIGTERM (the defaultkill/ orchestrator stop on Unix) actually cancels an in-flight run, notably the network-bound LLM judge. Comment and behavior now match.Verification
go build ./... && go vet ./... && go test ./...green.Not included (deliberately)
DisallowUnknownFieldsthe default would break the additive/forward-compatible contract the schema promises (0.xminors add optional fields). If desired, better as an opt-in-strictflag than a default; happy to add it separately.log.Fatalfpolish (review point 5): noted as a future polish pass, not urgent.🤖 Generated with Claude Code